import aiohttp
import asyncio


async def main():
    address = "http://127.0.0.1"
    port = 9988
    base_url = f"{address}:{port}"
    async with aiohttp.ClientSession() as session:
        async with session.get(base_url) as resp:
            print("Status:", resp.status)
            print("Content-type:", resp.headers["content-type"])
            html = await resp.text()
            print(html)

        async with session.get(f"{base_url}/api/data") as resp:
            json = await resp.json()
            print(json)


asyncio.run(main())
